﻿/*------------------------------------------------
// File Description: AssemblyLine DataBase Entity
// Author:			 汪亮
// Create Time:		 2020-03-07 01:48:19
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 流水线
    /// </summary>
    [Table(nameof(AssemblyLine))]
    public class AssemblyLine : BaseEntity
    {
        private string _lineName = string.Empty;
        private string _workshopCode;
        private string _workshopName;

        #region Public Property
        ///<Summary>
        /// 车间代码
        ///</Summary>
        public string WorkshopCode
        {
            get { return string.IsNullOrWhiteSpace(_workshopCode) ? string.Empty : _workshopCode; }
            set { _workshopCode = value; }
        }

        ///<Summary>
        /// 车间名称
        ///</Summary>
        public string WorkshopName
        {
            get { return string.IsNullOrWhiteSpace(_workshopName) ? string.Empty : _workshopName; }
            set { _workshopName = value; }
        }

        ///<Summary>
        /// 流水线名称
        ///</Summary>
        public string LineName
        {
            get { return string.IsNullOrWhiteSpace(_lineName) ? string.Empty : _lineName; }
            set { _lineName = value; }
        }

        ///<Summary>
        /// 状态
        ///</Summary>
        public Enum.CommonStatus Status { get; set; }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 流水线
        /// </summary>
        public virtual DbSet<AssemblyLine> AssemblyLines { get; set; }
    }
}